package com.gdk.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.gdk.dao.TicketOrderDao;
import com.gdk.service.TicketOrderService;


@Service
public class TicketOrderServiceImpl implements TicketOrderService {
	@Autowired
	private TicketOrderDao ticketOrderDao;

	/**
	 * 查询所有订单
	 * */
	@Override
	public List<Map<String, Object>> doFindAllOrder() {
		List<Map<String, Object>> allOrder = ticketOrderDao.findAllOrder();
		return allOrder;
	}
	/**
	 *  查询所有收费订单 
	 * */
	@Override
	public List<Map<String, Object>> doFindAllOrderAndMoney() {
		return ticketOrderDao.findAllOrderAndMoney();
	}
	/**
	 * 查询待核销订单
	 * */
	@Override
	public List<Map<String, Object>> doFindAllOrderAndStatus1() {
		return ticketOrderDao.findAllOrderAndStatus1();
	}
	/**
	 * 动态查询所有订单
	 * */
	@Override
	public List<Map<String, Object>> doFindAllOrderPaging(Map<String, Object> map) {
		return ticketOrderDao.findAllOrderPaging(map);
	}
	/**
	 * 修改订单状态 
	 * */
	@Override
	public int doUpdateOrderStatus(Map<String, Object> map) {
		return ticketOrderDao.updateOrderStatus(map);
	}
	/**
	 * 查询用户是否已下单
	 * */
	@Override
	public List<Map<String, Object>> doFindUserByOrder(Map<String, Object> map) {
		return ticketOrderDao.findUserByOrder(map);
	}
	/**
	 * 查询下级的订单
	 * */
	@Override
	public List<Map<String, Object>> doFindAllOrderByFXOne(Map<String, Object> map) {
		return ticketOrderDao.findAllOrderByFXOne(map);
	}
	/**
	 * 查看相关联的核销码  
	 * */
	@Override
	public List<Map<String, Object>> doFindHXCodeByOrder(Map<String, Object> map) {
		return ticketOrderDao.findHXCodeByOrder(map);
	}
	/**
	 * 查询所有核销码
	 * */
	@Override
	public List<Map<String, Object>> doFindAllHXCode(Map<String,Object> map) {
		return ticketOrderDao.findAllHXCode(map);
	}
	/**
	 * 查询核销码信息
	 * */
	@Override
	public List<Map<String,Object>> doFindHXCodeByCode(Map<String, Object> map) {
		return ticketOrderDao.findHXCodeByCode(map);
	}
	@Override
	public int doUpdateHXCodeStatus(Map<String, Object> map) {
		return ticketOrderDao.updateHXCodeStatus(map);
	}
	/**
	 * 查询指定商户的订单
	 * */
	@Override
	public List<Map<String, Object>> doFindAllOrderByShop(Map<String, Object> map) {
		return ticketOrderDao.findAllOrderByShop(map);
	}
	
	@Override
	public Map<String, Object> selectHXCodeByID(Map<String, Object> map) {
		return ticketOrderDao.selectHXCodeByID(map);
	}
	@Override
	public List<Map<String, Object>> selectAllHXCodeByOrderAndCodeStatus(Map<String, Object> map) {
		return ticketOrderDao.selectAllHXCodeByOrderAndCodeStatus(map);
	}
	@Override
	public Map<String, Object> selectHXCodeByCode(Map<String, Object> map) {
		return ticketOrderDao.selectHXCodeByCode(map);
	}
	@Override
	public int updateHXCodeStatusByCode(Map<String, Object> map) {
		return ticketOrderDao.updateHXCodeStatusByCode(map);
	}
	@Override
	public Map<String, Object> selectHXCodeByHXCode(Map<String, Object> map) {
		return ticketOrderDao.selectHXCodeByHXCode(map);
	}
}
